<template>
	<view v-if="value" class="loading-modal" :data-mask="mask">
		<view class="wraper">
			<text class="iconfont spin">&#xe6d1;</text>
			<slot></slot>
		</view>
	</view>
</template>

<script>
	export default{
		props:{
			'value':{type:Boolean},
			'mask':{type:Boolean,default:true}
		}
	}
</script>

<style lang="scss">
.loading-modal{
	position: fixed;
	width: 100%;
	height: 100%;
	left: 0;
	top: 0;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 998;
	&[data-mask="false"]{
		pointer-events: none;
	}
	.wraper{
		width: 180upx;
		height: 180upx;
		display: flex;
		align-items: center;
		align-content: center;
		justify-content: center;
		flex-wrap: wrap;
		border-radius: 10upx;
		background: rgba(0,0,0,0.5);
	}
	.spin{
		font-size: 50upx;
	}
}
</style>
